#ifndef LEVEL_HPP
#define LEVEL_HPP

#include <vector>
#include <string>

class Level
{
    private:

        std::vector< std::vector<int> > m_tiles;

    public:
        enum TileType
        {
            TT_Hole,
            TT_Floor,
            TT_Wall,
            TT_TopWall
        };

        Level() {}
        Level(const std::vector< std::vector<int> >& tiles)
            :m_tiles(tiles) {}

        unsigned int floorCount()const { return m_tiles.size(); }
        unsigned int angleCount(int level)const { return m_tiles[level].size(); }

        int getTile(int floor, int angle)const;
        void setTile(int level, int angle, int id);

        TileType getType(int id)const;
        bool isHole(int id)const;
        bool isFloor(int id)const;
        bool isWall(int id)const;
        bool isTopWall(int id)const;

        void print()const;
        void save(const std::string& fileName)const;
};

#endif
